Optimal. Leaf size=197 \[ \frac {2 \sqrt {2} a^{3/2} (B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 a (8 B+7 i A) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}-\frac {4 (19 B+21 i A) (a+i a \tan (c+d x))^{3/2}}{105 d}-\frac {8 a (8 B+7 i A) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.53, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3594, 3597, 3592, 3527, 3480, 206} \[ \frac {2 \sqrt {2} a^{3/2} (B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 a (8 B+7 i A) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}-\frac {4 (19 B+21 i A) (a+i a \tan (c+d x))^{3/2}}{105 d}-\frac {8 a (8 B+7 i A) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3480
Rule 3527
Rule 3592
Rule 3594
Rule 3597
Rubi steps
\begin {align*} \int \tan ^2(c+d x) (a+i a \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \, dx &=\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}+\frac {2}{7} \int \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {1}{2} a (7 A-6 i B)+\frac {1}{2} a (7 i A+8 B) \tan (c+d x)\right ) \, dx\\ &=\frac {2 a (7 i A+8 B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}+\frac {4 \int \tan (c+d x) \sqrt {a+i a \tan (c+d x)} \left (-a^2 (7 i A+8 B)+\frac {1}{2} a^2 (21 A-19 i B) \tan (c+d x)\right ) \, dx}{35 a}\\ &=\frac {2 a (7 i A+8 B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {4 (21 i A+19 B) (a+i a \tan (c+d x))^{3/2}}{105 d}+\frac {4 \int \sqrt {a+i a \tan (c+d x)} \left (-\frac {1}{2} a^2 (21 A-19 i B)-a^2 (7 i A+8 B) \tan (c+d x)\right ) \, dx}{35 a}\\ &=-\frac {8 a (7 i A+8 B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 a (7 i A+8 B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {4 (21 i A+19 B) (a+i a \tan (c+d x))^{3/2}}{105 d}-(2 a (A-i B)) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {8 a (7 i A+8 B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 a (7 i A+8 B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {4 (21 i A+19 B) (a+i a \tan (c+d x))^{3/2}}{105 d}+\frac {\left (4 a^2 (i A+B)\right ) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=\frac {2 \sqrt {2} a^{3/2} (i A+B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {8 a (7 i A+8 B) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 a (7 i A+8 B) \tan ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{35 d}+\frac {2 i a B \tan ^3(c+d x) \sqrt {a+i a \tan (c+d x)}}{7 d}-\frac {4 (21 i A+19 B) (a+i a \tan (c+d x))^{3/2}}{105 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.45, size = 239, normalized size = 1.21 \[ \frac {(a+i a \tan (c+d x))^{3/2} (A+B \tan (c+d x)) \left (\frac {2 \sqrt {2} (B+i A) \sinh ^{-1}\left (e^{i (c+d x)}\right )}{\left (\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^{3/2} \left (1+e^{2 i (c+d x)}\right )^{3/2}}-\frac {1}{210} (\tan (c+d x)+i) \sec ^{\frac {5}{2}}(c+d x) (21 (17 A-18 i B) \cos (c+d x)+(147 A-158 i B) \cos (3 (c+d x))+42 i A \sin (c+d x)+42 i A \sin (3 (c+d x))-7 B \sin (c+d x)+53 B \sin (3 (c+d x)))\right )}{d \sec ^{\frac {5}{2}}(c+d x) (A \cos (c+d x)+B \sin (c+d x))} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.56, size = 471, normalized size = 2.39 \[ \frac {105 \, \sqrt {-\frac {{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left ({\left (8 i \, A + 8 \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} \sqrt {-\frac {{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (2 i \, A + 2 \, B\right )} a}\right ) - 105 \, \sqrt {-\frac {{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left ({\left (8 i \, A + 8 \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )} - \sqrt {2} \sqrt {-\frac {{\left (32 \, A^{2} - 64 i \, A B - 32 \, B^{2}\right )} a^{3}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (2 i \, A + 2 \, B\right )} a}\right ) + \sqrt {2} {\left ({\left (-1512 i \, A - 1688 \, B\right )} a e^{\left (7 i \, d x + 7 i \, c\right )} + {\left (-3192 i \, A - 2968 \, B\right )} a e^{\left (5 i \, d x + 5 i \, c\right )} + {\left (-2520 i \, A - 3080 \, B\right )} a e^{\left (3 i \, d x + 3 i \, c\right )} + {\left (-840 i \, A - 840 \, B\right )} a e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{420 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.29, size = 164, normalized size = 0.83 \[ -\frac {2 i \left (-\frac {i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {7}{2}}}{7}+\frac {i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}} a}{5}+\frac {A \left (a +i a \tan \left (d x +c \right )\right )^{\frac {5}{2}} a}{5}-\frac {i B \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}} a^{2}}{3}-i a^{3} B \sqrt {a +i a \tan \left (d x +c \right )}+A \,a^{3} \sqrt {a +i a \tan \left (d x +c \right )}-a^{\frac {7}{2}} \left (-i B +A \right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 153, normalized size = 0.78 \[ -\frac {i \, {\left (105 \, \sqrt {2} {\left (A - i \, B\right )} a^{\frac {9}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 30 i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {7}{2}} B a + 42 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} {\left (A + i \, B\right )} a^{2} - 70 i \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} B a^{3} + 210 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} {\left (A - i \, B\right )} a^{4}\right )}}{105 \, a^{3} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.42, size = 211, normalized size = 1.07 \[ -\frac {2\,B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{3\,d}-\frac {A\,a\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,2{}\mathrm {i}}{d}-\frac {2\,B\,a\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}-\frac {A\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}\,2{}\mathrm {i}}{5\,a\,d}+\frac {2\,B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{5\,a\,d}-\frac {2\,B\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{7/2}}{7\,a^2\,d}-\frac {\sqrt {2}\,A\,{\left (-a\right )}^{3/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,2{}\mathrm {i}}{d}-\frac {\sqrt {2}\,B\,a^{3/2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2\,\sqrt {a}}\right )\,2{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}} \left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________